package experiment.util;


import com.google.code.microlog4android.Level;
import com.google.code.microlog4android.format.Formatter;


public class ExpFormatter implements Formatter {
	
    private static final String DELIMETER = " ; ";     
    private int lineNumber;   
    private StringBuffer buffer;
 
    public ExpFormatter() {
        this.lineNumber = 0; //the sequence of messages
        this.buffer   = new StringBuffer(); //message to be shown
    }
 
    public String format(String clientID, String name, long time, Level level,
            Object message, Throwable t) {
 
        this.buffer.delete(0, buffer.length()); //delete previously logged message

        this.buffer.append(this.lineNumber++);
        this.buffer.append(DELIMETER); 
        this.buffer.append(time);
        this.buffer.append(DELIMETER); 
        this.buffer.append(level);
        this.buffer.append(DELIMETER);
        this.buffer.append(message);
 
        return buffer.toString(); //creates the entire log message
    }


	public String[] getPropertyNames() {
		// TODO Auto-generated method stub
		return null;
	}

	public void setProperty(String arg0, String arg1) {
		// TODO Auto-generated method stub
		
	}

}
